package com.example.mybatis.service.impl;

import com.example.mybatis.mapper.DraftMapper;
import com.example.mybatis.mapper.PersonMapper;
import com.example.mybatis.pojo.Draft;
import com.example.mybatis.pojo.Person;
import com.example.mybatis.service.DraftService;
import com.example.mybatis.service.PersonService;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;
import java.util.Optional;

@Service("draftService")
public class DraftServiceImpl implements DraftService {
    @Autowired
    private DraftMapper draftMapper;

    @Override
    public List<Draft> selectOneToMany() {
        try {
            return draftMapper.selectOneToMany();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return Collections.EMPTY_LIST;
    }
}
